<div class="gray-bg">
    <!--<div class="bg-light lter b-b wrapper-md">
	    <h1 class="m-n font-thin h3">设备管理</h1>
	</div>-->
	<div class="wrapper">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">
		              	 设备管理
		              	 <div class="btn bg-color btn-xs" data-dismiss="modal" data-toggle="modal" data-target="#modal_3">导入设备</div>
		              	<div class="pos_abs col-sm-3">
		                	<div class="btn btn_greenyellow btn-xs" >&nbsp;&nbsp;</div>&nbsp;正常
		                	<div class="btn btn_red btn-xs" >&nbsp;&nbsp;</div>&nbsp;异常
		                	<div class="btn btn_gray btn-xs" >&nbsp;&nbsp;</div>&nbsp;未注册
		                	<div class="btn btn_blueviolet btn-xs" >&nbsp;&nbsp;</div>&nbsp;锁定
		                </div>
		               
                </div>
                
                <div class="panel-body">
                	
                    <form class="form-group">
                    	<div class="radio col-sm-2">
					            <label class="radio-inline">
					                <input type="radio" checked="" value="FENSAN" ng-model="way_1" name="optionsRadios">分散式</label>
					            <label class="radio-inline">
					                <input type="radio" value="JIZHONG" ng-model="way_1" id="" name="optionsRadios">集中式</label>
						</div>   
                        <div class="col-sm-4">
                        	<div class="col-sm-4">
								<select ng-init="pro_1 = prolist[0].name " class="inn_select" ng-model="pro_1" ng-change="proFunc_1(pro_1)">
									<option value="">省份 </option>
									<option value="{{k.pro_id}}" ng-repeat="k in prolist">{{k.name}}</option>
								</select>
							 </div>  
	                        <div class="col-sm-4">
	                            <select class="inn_select" ng-model="cty_1" ng-change="ctyFunc_1(cty_1)">
									<option value="">市/地区</option>
									<option value="{{k.city_id}}" ng-repeat="k in citylist">{{k.name}}</option>
								</select>
	                        </div>  
	                        <div class="col-sm-4">
								<select class="inn_select" ng-model="dis_1">
									<option value="">区/县 </option>
									<option value="{{k.dis_id}}" ng-repeat="k in dislist">{{k.name}}</option>
								</select>
							 </div>  
                        </div>  
                        <!--<ui-pcd child-class="col-sm-2" provinceid="{{provinceId}}" cityid="{{cityId}}" areaid="{{countyId}}" ></ui-pcd>-->
                        <div class="col-sm-5">
                        	<div class="col-sm-3 padding_right">
	                            <input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="tric_nmb"  placeholder="小区名" />
	                        </div>
	                        <div class="col-sm-3 padding_right">
								<input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="adr_nmb"  placeholder="地址" />
	                        </div>
	                        <div class="col-sm-2 padding_right">
	                            <input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="floor_nmb"  placeholder="楼栋" />
	                        </div>
	                        <div class="col-sm-2 padding_right">
								<input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="unit_nmb"  placeholder="单元" />
	                        </div> 
	                        <div class="col-sm-2 padding_right">
								<input type="search" class="form-control ng-pristine ng-valid ng-touched" ng-model="room_nmb"  placeholder="房号" />
	                        </div> 
                        </div>
                        
                       <div class="col-sm-1">
                       	 	<button class="btn bg-color" ng-click="sear_2(way_1,pro_1,cty_1,dis_1,tric_nmb,adr_nmb,floor_nmb,unit_nmb,room_nmb)">&nbsp;&nbsp;搜索&nbsp;&nbsp;</button>
                        </div> 
                       
                    </form>
                </div>
                <table class="table table-hover">
				 	<thead>
				        <td>房源编号</td>
				        <td>小区/公寓</td>
				        <td>地址</td>
				        <td>楼栋</td>
				        <td>单元</td>
				        <td>房号</td>
				        <td>房门</td>
				        <td>设备</td>
				        <td>租客</td>
			        </thead>
			        <tbody>
			        	<tr ng-repeat="x in list_1">
			        		<td>{{x.code}}</td>
					        <td>{{x.districtName}}</td>
					        <td>{{x.houseStreet.provinceId | proName:prolist }}{{x.houseStreet.cityId | cityName:oCityList}}{{x.houseStreet.dist | disName:oDisList}}{{x.houseStreet.street}}</td>
					        <td>{{x.floorNo}}</td>
					        <td>{{x.unit}}</td>
					        <td>{{x.roomNo}}</td>
					        <td>{{x.door}}</td>
					        <td>
					        	<a href="" ng-repeat="k in x.hardwares" class="{{k.hardwareStatus}}" data-toggle="modal" data-target="{{mdl}}" ng-click="hardwares(k,x)">{{k.type | warsName}}</a>
					        	<!--<a href="" class="{{}}" data-toggle="modal" data-target="#modal_5" ng-click="eleFuc(x)">电表</a>-->
					        </td>
					        <td>
					        	<a href=""  data-toggle="modal" data-target="#modal_6" ng-click="renter(x.members)">{{x.members.length}}</a>
					        </td>
			        	</tr>
				        
			        </tbody>
			        <tfoot>
			        	<tr>
				            <td colspan="12" id="pager_1">
				               
				            </td>
				        </tr>
						
			        </tfoot>
				</table>
            </div>
        </div>
    </div>
</div>

</div>

<!--门锁详情-->
	<div class="modal fade" id="modal_4" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">门锁详情</h4>
            </div>
            <div class="modal-body wrapper">
            	<div class="row">
            		<div class="col-sm-12">
            			厂商：{{supname_1}}
            		</div>
            		<div class="col-sm-12">
            			供应商设备号：{{devId_1}}
            		</div>
            		<div class="col-sm-12">
            			安装位置：{{hardwdress_1}}
            		</div>
            		<div class="col-sm-12">
            			在线状态：<span style="color:{{clor_1}}">{{hardwareStatus_3 | hardwarestatus_1_1}}</span>
            		</div>
            		<div class="col-sm-12">
            			电池电量：<span style="color:{{clor_2}}">{{hardwareStatus_4 | hardwarestatus_3}}</span>
            		</div>
            		<div class="col-sm-12">
            			安装上线时间：{{install_1 | date : 'yyyy-MM-dd'}}
            		</div>
            	</div>
            </div>
            <div class="modal-footer">
                <button type="button"  class="btn btn-primary" data-dismiss="modal" data-toggle="modal" data-target="#modal_4_1" ng-click="openDoor(devId_1,hardwdress_1_1)">开门历史</button>
            	<button type="button" class="btn btn-primary" ng-click="oClear(devId_1)">清除所有密码</button>
            </div>
        </div>
    </div>
</div>
<!--开门历史-->
	<div class="modal fade" id="modal_4_1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">开门记录</h4>
            </div>
            <div class="modal-body wrapper">
            	<div class="row">
            		<div class="col-sm-12">
            			{{openDress}}
            		</div>
            		<table class="table table-striped">
					 	<thead>
					        <td>开门时间</td>
					        <td>开门方式</td>
					        <td>开门人</td>
				        </thead>
				        <tbody>
				        	<tr ng-repeat="x in openlist">
				        		<td></td>
						        <td></td>
						        <td></td>
				        	</tr>
					        
				        </tbody>
				        <tfoot>
							<tr>
					            <td colspan="12" id="pager_3">
					               
					            </td>
				        	</tr>
				        </tfoot>
					</table>
            	</div>
            </div>
            <!--<div class="modal-footer">
                <div class="btn-group btn-group-sm" role="group" aria-label="...">
				  <button type="button" class="btn btn-default">周</button>
				  <button type="button" class="btn btn-default">月</button>
				</div>
            </div>-->
           
        </div>
    </div>
</div>

<!--电表详情-->
	<div class="modal fade" id="modal_5" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">电表详情</h4>
            </div>
            <div class="modal-body wrapper">
            	<div class="row">
            		<div class="col-sm-12">
            			厂商：{{supname}}
            		</div>
            		<div class="col-sm-12">
            			供应商设备号：{{devId}}
            		</div>
            		<div class="col-sm-12">
            			安装位置：{{hardwdress}}
            		</div>
            		<div class="col-sm-12">
            			在线状态：<span style="color:{{clor}}">{{hardwareStatus_1 | hardwarestatus_1}}</span>
            		</div>
            		<div class="col-sm-12">
            			通电状态：<span style="color:{{clor_t}}">{{hardwareStatus_2 | hardwarestatus_2}}</span>
            		</div>
            		<div class="col-sm-12">
            			付费模式状态：{{payMod | paymod}}
            		</div>
            		<div class="col-sm-12">
            			安装上线时间：{{install | date : 'yyyy-MM-dd'}}
            		</div>
            		<div class="col-sm-12">
            			单价：{{electricityPrice}}元/度
            		</div>
            	</div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal" data-toggle="modal" data-target="#modal_5_1" ng-click="power(devId,hardwdress)">电量历史</button>
                <button type="button" class="btn btn-primary" ng-click="loop(devId,hardwareStatus_2)">{{hardwareStatus_2 | hardwarestatus_2_1}}</button>
            </div>
        </div>
    </div>
</div>

<!--电量历史-->
	<div class="modal fade" id="modal_5_1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">电量历史</h4>
            </div>
            <div class="modal-body wrapper">
            	<div id="" class="row">
            		<div ng-show="chart" id="chart"  style="height: 300px;width: 590px;">
            			
            		</div>
            		<div ng-hide="chart" id="chart_1"  style="height: 300px;width: 590px;">
            			
            		</div>
            	</div>
            </div>
            <div class="modal-footer">
                <div class="btn-group btn-group-sm" role="group" aria-label="...">
				  <button type="button" class="btn btn-default" ng-click="oWeek()">周</button>
				  <button type="button" class="btn btn-default" ng-click="oMonth()">月</button>
				</div>
            </div>
        </div>
    </div>
</div>

<!--租客-->
	<div class="modal fade bs-example-modal-sm" tabindex="-1" id="modal_6" role="dialog" aria-labelledby="mySmallModalLabel">
	  <div class="modal-dialog modal-sm" role="document">
	    <div class="modal-content">
	    	<div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="">租客信息</h4>
            </div>
	        <table class="table">
	        	<tbody>
	        		<tr ng-repeat="x in oRenter">
	        			<td>{{$index+1}}</td>
				        <td>{{x.name}}</td>
				        <td>{{x.mobile}}</td>
	        		</tr>
	        	</tbody>
			</table>
			
	    </div>
	  </div>
	</div>

<!--导入excel表-->
	<!--编辑-->
	<!--data-dismiss="modal" data-toggle="modal" data-target="#modal_3"-->
	<div class="modal fade" id="modal_3" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">导入房源</h4>
            </div>
            <div class="modal-body wrapper">
            	<div class="row">
            		<div class="col-sm-12">
            			<div class="col-sm-8">
            				<div class="fileWrap">
            					<form id="uploadForm">
		            				<div class="col-sm-8 fileBar" ng-bind="flie_val"></div>
		            				<a class="" href="javascript:;">
		            					<input id="file_input" type="file" name="file" accept="application/vnd.ms-excel" file-model="myFile" ng-click="clearItems()" />
		            					<span>选择</span>
		            				</a>
		            				<button type="button" class="btn btn-primary btn-xs" style="height: 30px;" ng-click="UploadFile()">导入excel</button>
	            				</form>
            				</div>
            			</div>
            			<!--<button type="button" class="btn btn-primary btn-xs" style="height: 30px;" ng-click="UploadFile()">导入excel</button>-->
            		</div>
            	</div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default " id="" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>

<script>
	
/*	$(function(){
		
		$("#submit_input").click(function(){
			
			$.ajax({
				type:"post",
				url:"http://192.168.1.71:8080/hardware-service/api/excel/houseUploadByUnit.json",
				async:true,
			});
			
		})
		
	})*/
	
</script>
